package com.example.cron.feign;

import com.example.common.support.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author rlj
 * @Date 2021/4/22 11:39
 * @Version 1.0
 */
@FeignClient(value = "file")
public interface FileFeignService {

    /**
     * 调用文件上传服务
     * @param multipartFile 上传的文件
     * @return 上传结果
     */
    @PostMapping(value = "/file/fileUploadNOtRen", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    Result<Object> upload(@RequestPart(value = "file") MultipartFile multipartFile);
}
